package Ar;

/**
 * @Author MDD
 * @Description
 * @Version
 * @Date
 **/
public class Code01 {
    public static void main(String[] args) {

        int [] numbers;
        numbers = new int[5];
        numbers[0] = 78;
        numbers[1] = 98;
        numbers[2] = 66;
        numbers[3] = 88;
        numbers[4] = 67;
//        numbers[5] = 36;  数组越界


//       利用数组下标打印其对应值
        System.out.print(numbers[0]+"\t"+numbers[1]+"\t"+numbers[2]+"\t"+numbers[3]+"\t"+numbers[4]+"\n");

//      增强型for循环遍历数组
        for (int i :numbers) {
            System.out.print(i+"\t");
        }
        System.out.println();
//      普通for循环遍历数组
        for (int i = 0; i < numbers.length; i++) {
            System.out.print(i+"\t");
        }
    }
}
